package server;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
	
	public static void main(String[] args) {
		Server server=new Server();
		server.run();
	}

	public void run() {
		
		System.out.println("Server running...");
		
		int serverPort = 6789;
		ServerSocket listenSocket;
		try {
			listenSocket = new ServerSocket(serverPort);

			while (true) {
				Socket clientSocket = listenSocket.accept();
				
				Connection c=new Connection(clientSocket);
				c.start();
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
